package car;

public abstract class Vechile {
	private String serialNo;// 车牌
	private String brand;// 品牌
	private int seat;// 座位数
	private int price;// 租金
	// 本次出租的天数
	private int days = 0;

	private boolean isRent = false;// 是否已出租

	public int getDays() {
		return days;
	}

	public void setDays(int days) {
		this.days = days;
	}

	public Vechile(String serialNo, String brand, int seat, int price) {
		super();
		this.serialNo = serialNo;
		this.brand = brand;
		this.seat = seat;
		this.price = price;
	}

	public String getSerialNo() {
		return serialNo;
	}

	public void setSerialNo(String serialNo) {
		this.serialNo = serialNo;
	}

	public String getBrand() {
		return brand;
	}

	public void setBrand(String brand) {
		this.brand = brand;
	}

	public int getSeat() {
		return seat;
	}

	public void setSeat(int seat) {
		this.seat = seat;
	}

	public int getPrice() {
		return price;
	}

	public void setPrice(int price) {
		this.price = price;
	}

	public boolean isRent() {
		return isRent;
	}

	public void setRent(boolean f) {
		this.isRent = f;
	}

	@Override
	public String toString() {
		return "车牌=" + serialNo + ", 品牌=" + brand + ", 座位数=" + seat + ", 日租金=" + price + " " + (isRent ? "已出租" : "可租")
				+ "]";
	}

	public int calcMoney(int days) {
		return days * price;
	}
}
